home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 18 / AMIGAplus Sonderheft 18 (1999)(ICP)(DE)[!].iso / PD / Anwendungen / Warp3D / Install_Warp3D < prev    next >
Text File  |  1999-01-03  |  6KB  |  243 lines

  1. ; $VER: Installation script for Warp3D 1.0 ( 5. Dezember 1998)
  2. ; © Thomas & Hans-Jörg Frieden
  3. ; Created with GoldED 5.0
  4.  
  5. ; check if we are running under correct OS
  6.  
  7. (if (< (/ (getversion) 65536) 39)
  8.     (
  9.         (abort "Incorrect OS version (software requires OS 39 or better )!")
  10.     )
  11. )
  12.  
  13. ; error handling
  14.  
  15. ;
  16. ; Procedure to copy a single library
  17. (procedure P_copy_single arg1 arg2 arg3
  18.         (copylib
  19.                 (confirm)
  20.                 (prompt arg3)
  21.                 (help @copylib-help)
  22.                 (source arg1)
  23.                 (dest arg2)
  24.                 (optional "oknodelete" "askuser")
  25.         )
  26. )
  27.  
  28. (onerror
  29.     (if (> @ioerr 0)
  30.         (
  31.             (message
  32.                 ("An error has occurred during installation. Please check the log file to understand the error.")
  33.             )
  34.         )
  35.     )
  36.     (exit (quiet))
  37. )
  38.  
  39. (set #installmode
  40.     (askbool
  41.         (prompt "Choose the installation mode:")
  42.         (help "Select Install if you want to install Warp3D, and Uninstall if you want to remove it. Warp3D is a hardware independent driver system for 3d accelerators.")
  43.         (choices
  44.             "Install"
  45.             "Uninstall"
  46.         )
  47.         (default 1)
  48.     )
  49. )
  50.  
  51. (if (= #installmode 1)
  52.     ; normal installation
  53.     (
  54.         (welcome (cat
  55.             "Welcome to the Warp3D installation. This utility will install or "
  56.             "update Warp3D, the hardware-independent 3D driver system, on your "
  57.             "Amiga. ")
  58.         )
  59.  
  60.  
  61.         (message "The Installation program will now create a new directory \"Warp3D\" in your LIBS directory where the Warp3D libraries will be installed.")
  62.         (makedir "Libs:Warp3D/")
  63.         (makedir "Libs:Warp3D/GFXdrivers")
  64.         (makedir "Libs:Warp3D/HWdrivers")
  65.         ; --- Try to find out if WarpUp is installed.
  66.         (if (exists "libs:Warp.library" (noreq))
  67.             (set #ppc 1)
  68.             (set #pcc 0)
  69.         )
  70.         (if (= #ppc 1)
  71.             (set #result
  72.                 (askbool
  73.                     (prompt "You seem to have WarpUp installed. Warp3D comes with a special PPC version that is usable for WarpUp applications. Do you want to install the PPC libraries, too?")
  74.                     (help @askbool-help)
  75.                     (choices "Yes" "No")
  76.                     (default 1)
  77.                 )
  78.             )
  79.             (if (= #result 0)
  80.                 (set #ppc 0)
  81.             )
  82.         )
  83.         (copylib
  84.             (prompt "Copying the master library")
  85.             (help @copylib-help)
  86.             (source "libs/Warp3D.library")
  87.             (dest "libs:")
  88.         )
  89.         (if (= #ppc 1)
  90.             (copylib
  91.                 (prompt "Copying the PPC master library")
  92.                 (help @copylib-help)
  93.                 (source "libs/Warp3DPPC.library")
  94.                 (dest "libs:")
  95.             )
  96.         )
  97.  
  98.         (P_copy_single "libs/Warp3D/gfxdrivers/W3D_CyberGFX.library"
  99.                        "libs:Warp3D/GFXdrivers"
  100.                        "Copy CyberGraphX driver"
  101.         )
  102.         (if (= #ppc 1)
  103.             (P_copy_single "libs/Warp3D/gfxdrivers/W3D_CyberGFX_PPC.library"
  104.                            "libs:Warp3D/GFXdrivers"
  105.                            "Copy CyberGraphX driver (PPC version)"
  106.             )
  107.         )
  108.         (P_copy_single "libs/Warp3D/gfxdrivers/W3D_Picasso96.library"
  109.                        "libs:Warp3D/GFXdrivers"
  110.                        "Copy Picasso96 driver"
  111.         )
  112.         (if (= #ppc 1)
  113.             (P_copy_single "libs/Warp3D/gfxdrivers/W3D_Picasso96_PPC.library"
  114.                            "libs:Warp3D/GFXdrivers"
  115.                            "Copy Picasso96 driver (PPC version)"
  116.             )
  117.         )
  118.  
  119.  
  120.         ; Try to find out the graphics card
  121.         (if (exists "devs:Monitors/CVision3D" (noreq))
  122.             (set #graka 0)
  123.             (set #graka -1)
  124.         )
  125.         ; Ask for graphics card
  126.         (set #result
  127.             (askchoice
  128.                 (prompt "Please select the graphics device you want to use.")
  129.                 (help @askchoice-help)
  130.                 (choices
  131.                     "CyberVision64/3D"
  132.                     "None of the above"
  133.                 )
  134.                 (default #graka)
  135.             )
  136.         )
  137.         (select #graka
  138.             (
  139.                 (set #grdrv "libs/Warp3D/HWdrivers/W3D_Virge.library")
  140.                 (set #grdrv2 "libs/Warp3D/HWdrivers/W3D_Virge_PPC.library")
  141.             )
  142.         )
  143.         (copylib
  144.             (prompt "Copying the hardware driver library")
  145.             (help @copylib-help)
  146.             (source #grdrv)
  147.             (dest "libs:Warp3D/HWdrivers")
  148.         )
  149.         (if (= #ppc 1)
  150.             (copylib
  151.                 (prompt "Copying the PPC hardware driver library")
  152.                 (help @copylib-help)
  153.                 (source #grdrv2)
  154.                 (dest "libs:Warp3D/HWdrivers")
  155.             )
  156.         )
  157.         ; Ask for demo installation
  158.         (set #result
  159.             (askbool
  160.                 (prompt "Do you want to install the demo?")
  161.                 (help @askbool-help)
  162.                 (choices
  163.                     "Yes"
  164.                     "No"
  165.                 )
  166.                 (default 1)
  167.             )
  168.         )
  169.         (if (= #result 1) (
  170.                 (set #demodest
  171.                     (askdir
  172.                         (prompt "Select a location to install the Demo. A Drawer \"W3DDemo\" will be created")
  173.                         (help @askdir-help)
  174.                         (newpath)
  175.                         (default "ram:")
  176.                     )
  177.                 )
  178.                 (if (NOT (exists #demodest))
  179.                     (makedir #demodest)
  180.                 )
  181.                 (copyfiles
  182.                     (source "demo/")
  183.                     (dest (tackon #demodest "W3DDemo"))
  184.                     (infos)
  185.                     (all)
  186.                     (optional "oknodelete" "force" "askuser")
  187.                 )
  188.             )
  189.         )
  190.         (set #result
  191.             (askbool
  192.                 (prompt "Do you want to Install the User's Guide?")
  193.                 (help @askbool-help)
  194.                 (choices
  195.                     "Yes"
  196.                     "No"
  197.                 )
  198.                 (default 1)
  199.             )
  200.         )
  201.         (if (= #result 1)
  202.             (
  203.                 (set #destdoc (askdir
  204.                         (prompt "Select the place to install the documentation. A drawer \"docs\" will be created.")
  205.                         (help @askdir-help)
  206.                         (newpath)
  207.                         (default "HELP:")
  208.                     )
  209.                 )
  210.                 (copyfiles
  211.                     (prompt "Copying documentation files")
  212.                     (help @copyfiles-help)
  213.                     (source "Docs")
  214.                     (infos)
  215.                     (all)
  216.                     (dest (tackon #destdoc "Docs"))
  217.                 )
  218.             )
  219.         )
  220.  
  221.         (exit)
  222.     )
  223.  
  224.     ; uninstall application
  225.  
  226.     (
  227.         ; --- insert your code below ---
  228.         (delete "libs:Warp3D.library" (optional "force"))
  229.         (delete "libs:Warp3DPPC.library" (optional "force"))
  230.         (delete "libs:Warp3D/GFXdrivers/#?" (optional "force"))
  231.         (delete "libs:Warp3D/HWdrivers/#?" (optional "force"))
  232.         (delete "libs:Warp3D/GFXdrivers" (optional "force"))
  233.         (delete "libs:Warp3D/HWdrivers" (optional "force"))
  234.         (delete "libs:Warp3D/" (optional "force"))
  235.         ; -- end of your code ---
  236.  
  237.         (message "Uninstallation completed. The demo and documentation must be deleted manually.")
  238.  
  239.         (exit (quiet))
  240.     )
  241. )
  242.  
  243.